/**
 * @Author DengJia
 * @Date 2021/7/28 23:34
 * @Description
 */

public class PassObjectDemo {
    public static void main(String[] args) {
        Letter letter = new Letter();
        letter.c = 'a';
        System.out.println("1、c：" + letter.c); // a
        f(letter);
        System.out.println("2、c：" + letter.c); // h
    }

    static void f(Letter y) {
        y.c = 'h';
    }
}

class Letter {
    char c;
}
